/*
*
==============================================================================
*  Name        : 
*  Part of     : Omen Game Engine
*  Description : 
*  Version     : 1.0
*
*  Copyright (c) 2013 Lauri Kortevaara.
* 
==============================================================================
*/

#ifndef _OMEN_TYPETYPES_H_
#define _OMEN_TYPETYPES_H_


/// <summary>Omen Engine numeric data types</summary>
#ifndef BYTE
    typedef unsigned char BYTE;
#endif

#ifndef WORD 
    typedef unsigned short WORD;
#endif

#ifndef DWORD 
    typedef unsigned long DWORD;
#endif

#ifndef INT64
    typedef signed __int64  INT64;
#endif


/// <summary>Omen Engine Globally Unique Identifier GUID. The GUID is format of 8-4-4-4-12. For Example: 550e8400-e29b-41d4-a716-446655440000</summary>
extern "C"
{
    typedef struct _Omen_GUID {
        BYTE  Data[37]; //36 hex digits and trailing \0
    } Omen_GUID;

    
}




/// <summary>UUID Generation functions. Thanks to ubik@stackoverflow.com http://stackoverflow.com/questions/543306/platform-independent-guid-generation-in-c </summary>
extern "C"
{
#ifdef _WIN32
#include <Rpc.h>
#pragma comment(lib,"Rpcrt4.lib")
#else
#include <uuid/uuid.h>
#endif
}

#ifndef OMEN_SOURCE
__declspec(dllimport) Omen_GUID newUUID();
__declspec(dllimport) Omen_GUID OMEN_UUID( const char str[] );
#else
__declspec(dllexport) Omen_GUID newUUID();
__declspec(dllexport) Omen_GUID OMEN_UUID( const char str[] );
#endif


namespace Omen 
{
    #ifndef Float
        #ifdef OMEN_USE_DOUBLE_PRECISION
            typedef double Float;
        #else
            typedef float Float;
        #endif
    #endif
} // Namespace Omen

typedef struct _OMEN_MATRIX4
{
    union {
        struct {
            Omen::Float m11, m12, m13, m14;
            Omen::Float m21, m22, m23, m24;
            Omen::Float m31, m32, m33, m34;
            Omen::Float m41, m42, m43, m44;
        };
        Omen::Float m[16];
    };
} OMEN_MATRIX4;


typedef struct _OMEN_POINT2D
{
    Omen::Float x,y;
} POINT2D;

typedef struct _OMEN_POINT3D
{
    Omen::Float x,y,z;
} POINT3D;

#endif //_OMEN_TYPETYPES_H_